<!--
 * @Descripttion: 
 * @Version: 
 * @Author: gaohj
 * @Date: 2022-11-01 16:06:55
 * @LastEditors: Please set LastEditors
 * @LastEditTime: 2022-11-01 16:10:42
-->
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        body{
            width: 1500px;
            height: 1500px;
            background-color: pink;
        }
    </style>
</head>
<body>
    <script>
        // 这两个都是包含滚动条在内的尺寸 
        console.log('宽度',window.innerWidth);
        console.log('高度',window.innerHeight);

    </script>
</body>
</html>